import { createRouter, createWebHistory} from "vue-router";
import Home from "@/components/Home";

const routes = [{
    path:"/",
    mete:{
        title: '首页'
    },
    component: ()=> import('../components/Login'),
},{
    path:"/Home",
    name: Home,
    meta:{
        title: '主页面'
    },
    component: Home,
    children:[{
        path: "/Home/menu",
        component: ()=> import('../views/Menu'),
        meta:{
            title: '菜单列表'
        },
    },{
        path: "/Home/user",
        meta:{
            title: '用户列表'
        },
        component: ()=> import('../views/User')
    }
    ]
},{
    path: "/register",
    meta:{
        title: '注册页面'
    },
    component: ()=> import('../views/Register')
},{
    path: "/menu",
    component: ()=> import('../views/Menu'),
    meta:{
        title: '菜单页面'
    },
},
];
const router = createRouter({
    history: createWebHistory(),
    routes: routes
});
export default router